package objs;

import service.Play;

import java.awt.*;

public class BombExpolodeobj extends Pojo{
     private int bombDisappearState=0;

    public int getBombDisappearState() {
        return bombDisappearState;
    }

    public void setBombDisappearState(int bombDisappearState) {
        this.bombDisappearState = bombDisappearState;
    }

    public BombExpolodeobj() {
    }

    public BombExpolodeobj(Image image, int x, int y, int width, int height, double speed, Play frame) {
        super(image, x, y, width, height, speed, frame);
    }

    public BombExpolodeobj(Image image, int x, int y, double speed) {
        super(image, x, y, speed);
    }

    @Override
    public void paintSelf(Graphics gImage) {
        gImage.drawImage(image,x,y,width,height,null);
        this.bombDisappearState++;
        if(this.bombDisappearState==3){
            Play.pojoList.remove(this);
        }
    }
}
